#ifndef CBASE_H_
#define CBASE_H_
#include "MMath.h"

#include "d3dx9effect.h"

enum BaseType{PLAYER, WORLD, PICK_UP, NOODLE, TRIANGLE, CLOUD, RAINDROP, NUM_BASE_TYPES};

class TextureManager;
class CCamera;

class CBase
{
private:

public:
	unsigned int	m_unType;

	Vec3			m_Pos;
	Vec3			m_Vel;
	float			m_fTheta;

	static TextureManager*		s_pTM;

	unsigned int	m_unRefCount;
	int m_TextureID;

	CBase();
	virtual ~CBase();

	void AddRef() { m_unRefCount++; }
	void Release() { m_unRefCount--; if (!m_unRefCount) delete this; }

	virtual void Update(float fElapsed);
	virtual void Render() = 0;

	virtual bool CheckCollision(CBase *pBase);
	void CalculateTheta(void);
	float GetHeightSq();
};

#endif